<template>
    <div id="tmpl">
        <div id="desc">
            <h4>{{desc.title}}</h4>
            <p v-html="desc.content"></p>
        </div>
    </div>
</template>
<script>
import { Toast } from 'mint-ui';
import common from '../../kits/common.js';
export default {
    data() {
        return {
            id: 0,
            desc: 
                {}
                   
        }
    },
    created() {
        this.id = this.$route.params.id;
        this.getdesc();
    },
    methods:{
        getdesc(){
            var url=common.apidomain+'/api/goods/getdesc/'+this.id;
            this.$http.get(url).then(function(res){
                if(res.body.status !=0){
                    Toast(res.body.message);
                    return;
                }
                this.desc=res.body.message[0];
            })
        }
    }

}
</script>
<style scoped>
#desc{
    padding: 10px;
}
#desc h4{
    padding-bottom:5px;
    border-bottom:2px solid rgba(0,0,0,0.3);
}
</style>


